Optimal. Leaf size=93 \[ -\frac{a^2 (3 B+i A)}{2 c^3 f (\tan (e+f x)+i)^2}-\frac{2 a^2 (A-i B)}{3 c^3 f (\tan (e+f x)+i)^3}-\frac{i a^2 B}{c^3 f (\tan (e+f x)+i)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.152321, antiderivative size = 93, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 41, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.049, Rules used = {3588, 77} \[ -\frac{a^2 (3 B+i A)}{2 c^3 f (\tan (e+f x)+i)^2}-\frac{2 a^2 (A-i B)}{3 c^3 f (\tan (e+f x)+i)^3}-\frac{i a^2 B}{c^3 f (\tan (e+f x)+i)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3588
Rule 77
Rubi steps
\begin{align*} \int \frac{(a+i a \tan (e+f x))^2 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^3} \, dx &=\frac{(a c) \operatorname{Subst}\left (\int \frac{(a+i a x) (A+B x)}{(c-i c x)^4} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{(a c) \operatorname{Subst}\left (\int \left (\frac{2 a (A-i B)}{c^4 (i+x)^4}+\frac{a (i A+3 B)}{c^4 (i+x)^3}+\frac{i a B}{c^4 (i+x)^2}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{2 a^2 (A-i B)}{3 c^3 f (i+\tan (e+f x))^3}-\frac{a^2 (i A+3 B)}{2 c^3 f (i+\tan (e+f x))^2}-\frac{i a^2 B}{c^3 f (i+\tan (e+f x))}\\ \end{align*}
Mathematica [A] time = 2.68653, size = 81, normalized size = 0.87 \[ \frac{a^2 (\cos (5 e+7 f x)+i \sin (5 e+7 f x)) ((B-5 i A) \cos (e+f x)-(A+5 i B) \sin (e+f x))}{24 c^3 f (\cos (f x)+i \sin (f x))^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.047, size = 69, normalized size = 0.7 \begin{align*}{\frac{{a}^{2}}{f{c}^{3}} \left ( -{\frac{2\,A-2\,iB}{3\, \left ( \tan \left ( fx+e \right ) +i \right ) ^{3}}}-{\frac{iB}{\tan \left ( fx+e \right ) +i}}-{\frac{iA+3\,B}{2\, \left ( \tan \left ( fx+e \right ) +i \right ) ^{2}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.41494, size = 130, normalized size = 1.4 \begin{align*} \frac{{\left (-2 i \, A - 2 \, B\right )} a^{2} e^{\left (6 i \, f x + 6 i \, e\right )} +{\left (-3 i \, A + 3 \, B\right )} a^{2} e^{\left (4 i \, f x + 4 i \, e\right )}}{24 \, c^{3} f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.36629, size = 168, normalized size = 1.81 \begin{align*} \begin{cases} \frac{\left (- 12 i A a^{2} c^{3} f e^{4 i e} + 12 B a^{2} c^{3} f e^{4 i e}\right ) e^{4 i f x} + \left (- 8 i A a^{2} c^{3} f e^{6 i e} - 8 B a^{2} c^{3} f e^{6 i e}\right ) e^{6 i f x}}{96 c^{6} f^{2}} & \text{for}\: 96 c^{6} f^{2} \neq 0 \\\frac{x \left (A a^{2} e^{6 i e} + A a^{2} e^{4 i e} - i B a^{2} e^{6 i e} + i B a^{2} e^{4 i e}\right )}{2 c^{3}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.55278, size = 223, normalized size = 2.4 \begin{align*} -\frac{2 \,{\left (3 \, A a^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{5} + 3 i \, A a^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} - 3 \, B a^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} - 8 \, A a^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 2 i \, B a^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 3 i \, A a^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 3 \, B a^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 3 \, A a^{2} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )\right )}}{3 \, c^{3} f{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + i\right )}^{6}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]